import 'package:flutter/material.dart';
import 'package:hello_flutter/util/RouteUtils.dart';
import 'TestGridNine.dart';
import 'TestImageGrid.dart';

class TestGrid extends StatefulWidget {
  @override
  _TestGridState createState() => _TestGridState();
}

class _TestGridState extends State<TestGrid> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('表格测试'),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            leading: Icon(Icons.list),
            title: Text("九宫格图标"),
            onTap: () {
              showDialog<Null>(
                context: context, //BuildContext对象
                barrierDismissible: false,
                builder: (BuildContext context) {
                  return new TestGridNine();
                },
              );
            },
          ),
          ListTile(
            leading: Icon(Icons.list),
            title: Text("图片表格Demo"),
            onTap: () {
              RouteUtils.route2Page(context, TestImageGrid());
            },
          ),
        ],
      ),
    );
  }
}
